import request from '../request'

const Api = {
  page: '/api/sys/lm/page',
  getLMModule: '/api/sys/lm/getLMModule',
  save: '/api/sys/lm/save',
  edit: '/api/sys/lm/edit',
  remove: '/api/sys/lm/remove',
  removeBatch: '/api/sys/lm/removeBatch',
}

/** 查询日志 */
export const page = data => {
  return request.request({
    url: Api.page,
    params: data,
    method: 'GET'
  })
}

/** 清空日志 */
export const clean = data => {
  return request.request({
    url: Api.clean,
    params: data,
    method: 'DELETE'
  })
}

/**获取模块**/
export const getLMModule = data => {
  return request.request({
    url: Api.getLMModule,
    data: data,
    method: 'GET'
  })
}

/** 新增库存 */
export const save = data => {
  return request.request({
    url: Api.save,
    data: data,
    method: 'POST'
  })
}

/** 修改危险物品库存 */
export const edit = data => {
  return request.request({
    url: Api.edit,
    data: data,
    method: 'PUT'
  })
}

/** 删除危险物品库存 */
export const remove = data => {
  return request.request({
    url: Api.remove,
    params: data,
    method: 'DELETE'
  })
}

/** 批量删除危险物品库存 */
export const removeBatch = data => {
  return request.request({
    url: Api.removeBatch,
    params: data,
    method: 'DELETE'
  })
}
